#!/usr/bin/python3
# -*- coding: utf-8 -*-

import sys
sys.path.insert(0, '.')
import os


file_list_path = r'/rootfs/media/kasim/Data1/data/ErisedPersonAge/BoxFeature.norm.txt'
out_file_list_path = r'/rootfs/media/kasim/Data1/data/ErisedPersonAge/faceid_file_list.txt'


def main():
    out_file = open(out_file_list_path, 'w')
    face_id = 1
    with open(file_list_path, 'r') as file:
        for line in file.readlines():
            file_name = line.strip().split()[0]
            out_info = '{} {} {} 1\n'.format(face_id, face_id, file_name)
            out_file.write(out_info)
            face_id += 1
    out_file.close()
    os.system('chmod a+wr {}'.format(out_file_list_path))


if __name__ == '__main__':
    main()
